import fetch from '@/config/fetch.js';
//后台登陆
export const adminLogin=(userName, passWord) =>fetch('/login/login',{userName:userName,passWord:passWord},'POST');

export const radioBoxs=()=>fetch('/aritcle/Fclass','','GET');

export const checkBoxs=()=>fetch('/lable/lables','','GET');

export const addContent=(aTitle,author,Fclass,Content,img,table)=>fetch('/content/addContent',{aTitle:aTitle,author:author,Fclass:Fclass,Content:Content,img:img,table:table},'POST');

export const selectContent=(onenum,num)=>fetch('/content/selectContent',{onenum:onenum,num:num},'POST');

export const updates=(_id)=>fetch('/content/update',{_id:_id},'POST');

export const updateInfo=(_id,aTitle,author,Fclass,Content,img,table)=>fetch('/content/updateInfo',{_id:_id,aTitle:aTitle,author:author,Fclass:Fclass,Content:Content,img:img,table:table},'POST');

export const recycleAdd=(aTitle,author,Fclass,Content,img,table)=>fetch('/recycle/addInfo',{aTitle:aTitle,author:author,Fclass:Fclass,Content:Content,img:img,table:table},'POST');

export const deleteContent=(id)=>fetch('/content/deletes',{id:id},'POST');

export const recycleSelect=(onenum,num)=>fetch('/recycle/selectInfo',{onenum:onenum,num:num},'POST');

export const oneClass=(className)=>fetch('/aritcle/oneClass',{className:className},'POST');

export const deleteRecycle=(id)=>fetch('/recycle/deleteInfo',{id:id},'POST');

export const registerImg=()=>fetch('/user/register','','GET');

export const userLogin=(account,password,code)=>fetch('/user/login',{account:account,password:password,code:code},'POST');

export const session=(id)=>fetch('/user/session',{_id:id},'POST');

export const userImg=(id)=>fetch('/user/userImg',{id:id},'POST');

export const updateImg=(id,img)=>fetch('/user/updateImg',{_id:id,img:img},'POST');

export const classId=(className)=>fetch('/aritcle/classId',{className:className},'POST');

export const classContent=(Fclass)=>fetch('/content/classContent',{Fclass:Fclass},'POST');

export const newRegis=(userName,account,password,sex,age,Info)=>fetch('/user/newRegis',{userName:userName,account:account,password:password,sex:sex,age:age,Info:Info},'POST');

export const userInfo=(id)=>fetch('/user/userInfo',{id:id},'POST');

export const createCom=(userName,content,img,AritcleId,parentCom)=>fetch('/comment/createCom',{userName:userName,content:content,img:img,AritcleId:AritcleId,parentCom:parentCom},'POST');

export const getCom=(id)=>fetch('/comment/getCom',{id:id},'POST');

export const logout=(id)=>fetch('/user/logout',{_id:id},'POST');

export const getAllCom=()=>fetch('/comment/getAllCom','','GET');

export const DeleteCom=(id)=>fetch('/comment/DeleteCom',{id:id},'POST');

export const updateClass=(id,className)=>fetch('/aritcle/updateClass',{id:id,className:className},'POST');

export const deleteClass=(id)=>fetch('/aritcle/deleteClass',{id:id},'POST');

export const classContents=(Fclass)=>fetch('/content/classContent',{Fclass:Fclass},'POST');

export const DeleteArticle=(AritcleId)=>fetch('/comment/DeleteArticle',{AritcleId:AritcleId},'POST');

export const addClass=(className)=>fetch('/aritcle/addClass',{className:className},'POST');

export const updateLable=(id,lableName)=>fetch('/lable/updateLable',{id:id,lableName:lableName},'POST');

export const deleteLable=(id)=>fetch('/lable/deleteLable',{id:id},'POST');

export const FriendInfo=()=>fetch('/friend/FriendInfo','','GET');

export const updateFriend=(id,FriendName,FriendAddress)=>fetch('/friend/UpdateFriend',{id:id,FriendName:FriendName,FriendAddress:FriendAddress},'POST');

export const addFriends=(FriendName,FriendAddress)=>fetch('/friend/addFriends',{FriendName:FriendName,FriendAddress:FriendAddress},'POST');

export const deleteFriend=(id)=>fetch('/friend/deleteFriend',{id:id},'POST');

export const userAllInfo=()=>fetch('/user/userAllInfo','','GET');

export const userState=(id)=>fetch('/user/userState',{id:id},'POST');

export const createColl=(userId,contentId)=>fetch('/Collection/createColl',{userId:userId,contentId:contentId},'POST');

export const selectColl=(userId,contentId)=>fetch('/Collection/selectColl',{userId:userId,contentId:contentId},'POST');

export const deleteColl=(userId,contentId)=>fetch('/Collection/deleteColl',{userId:userId,contentId:contentId},'POST');

export const createThumbsUp=(userId,contentId)=>fetch('/ThumbsUp/createThumbsUp',{userId:userId,contentId:contentId},'POST');

export const deleteThumbsUp=(userId,contentId)=>fetch('/ThumbsUp/deleteThumbsUp',{userId:userId,contentId:contentId},'POST');

export const selectThumbsUp=(userId,contentId)=>fetch('/ThumbsUp/selectThumbsUp',{userId:userId,contentId:contentId},'POST');